﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="EmailTemplate.aspx.cs" Inherits="Admin_EmailTemplate" %>

<%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <!--  start page-heading -->
    <div id="page-heading">
        <div style="width: 967px;">
            <table border="0" width="100%" cellpadding="0" cellspacing="0" class="content-table">
                <tr>
                    <th class="topleft">
                    </th>
                    <td class="tbl-border-top">
                        &nbsp;</td>
                    <th class="topright">
                    </th>
                </tr>
                <tr>
                    <td class="tbl-border-left">
                    </td>
                    <td>
                        <div class="content-table-inner">
                            <div class="linelargeSearch">
                                <div class="contenttextLarge" style="float: left">
                                    <strong>Title:</strong>
                                    <asp:TextBox ID="txtTitleSearch" CssClass="textName" runat="server"></asp:TextBox>
                                    <strong style="margin-right: 10px; margin-left: 10px;">CreateDate:</strong>
                                    <input onclick="createcalender();" runat="server" id="txtCreDateSearch" type="text" style="margin-right:20px;" />
                                    <asp:LinkButton ID="linkSearch" runat="server" OnClick="linkSearch_Click">
                                        <img src="images/Search.png" onmouseover="this.src='images/SearchMouseOver.png';" onmouseout="this.src='images/Search.png';" alt="Search" /></asp:LinkButton>
                                    <asp:LinkButton ID="linkSearchAll" runat="server" OnClick="linkSearchAll_Click">
                                        <img src="images/SearchAll.png" onmouseover="this.src='images/SearchAllMouseOver.png';" onmouseout="this.src='images/SearchAll.png';" alt="Search" /></asp:LinkButton>
                                    <strong style="margin-right: 10px; margin-left: 10px; display: none;">Update Date:
                                        <input onclick="createcalen();" runat="server" id="txtUpDateSearch" type="text" /></strong>
                                </div>
                            </div>
                            <div class="linelargeSearch">
                            </div>
                        </div>
                    </td>
                    <td class="tbl-border-right">
                    </td>
                </tr>
                <tr>
                    <th class="sized bottomleft">
                    </th>
                    <td class="tbl-border-bottom">
                        &nbsp;</td>
                    <th class="sized bottomright">
                    </th>
                </tr>
            </table>
        </div>
    </div>
    <!-- end page-heading -->
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
            <th class="topleft">
            </th>
            <td id="tbl-border-top">
                &nbsp;</td>
            <th class="topright">
            </th>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
        </tr>
        <tr>
            <td id="tbl-border-left">
            </td>
            <td>
                <!--  start content-table-inner ...................................................................... START -->
                <div id="content-table-inner">
                    <!--  start table-content  -->
                    <div id="table-content">
                        <div style="color: Red; font-weight: bold; text-align: center;">
                            <asp:Literal ID="lb_error" runat="server"></asp:Literal>
                        </div>
                        <!--  start product-table ..................................................................................... -->
                        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                            <asp:Repeater ID="rptList" runat="server" OnItemCommand="rptList_ItemCommand" OnItemDataBound="rptList_ItemDataBound">
                                <HeaderTemplate>
                                    <tr>
                                        <th class="table-header-check">
                                            <asp:CheckBox ID="checkall" onclick='CheckAll(this)' runat="server" />
                                        </th>
                                        <th class="table-header-repeat line-left minwidth-1">
                                            <a href="">Title</a>
                                        </th>
                                        <th class="table-header-repeat line-left minwidth-1">
                                            <a href="">Create Date</a>
                                        </th>
                                        <th class="table-header-repeat line-left minwidth-1">
                                            <a href="">Update Date</a>
                                        </th>
                                        <th class="table-header-repeat line-left">
                                            <a href="">Code</a></th>
                                        <th class="table-header-options line-left">
                                            <a href="">Options</a></th>
                                    </tr>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr class="alternate-row" id="tr" runat="server">
                                        <td>
                                            <asp:CheckBox runat="server" ID="chkDelete" />
                                            <asp:HiddenField ID="hidID" runat="server" />
                                        </td>
                                        <td>
                                            <a href="AddEmailTemplate.aspx?id=<%#Eval("NewsletterId") %>">
                                                <asp:Literal ID="ltrTitle" runat="server"></asp:Literal>
                                            </a>
                                        </td>
                                        <td>
                                            <asp:Literal ID="ltrCreDate" runat="server"></asp:Literal>
                                        </td>
                                        <td>
                                            <asp:Literal ID="ltrUpDate" runat="server"></asp:Literal>
                                        </td>
                                        <td>
                                            <input id="txtOrder" runat="server" style="width: 50px; text-align: center;" type="text" />
                                        </td>
                                        <td class="options-width">
                                            <a href="AddEmailTemplate.aspx?id=<%#Eval("NewsletterId")%>" title="Edit" class="icon-1 info-tooltip">
                                            </a>
                                            <asp:LinkButton CssClass="icon-2 info-tooltip" ID="lndelete" OnClientClick="javascript: return confirm('Are you sure you want to delete this item?');"
                                                runat="server" OnClick="lndelete_Click" CausesValidation="false" ToolTip="Delete"></asp:LinkButton>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                        <!--  end product-table................................... -->
                    </div>
                    <!--  end content-table  -->
                    <!--  start actions-box ............................................... -->
                    <div id="actions-box">
                        <a href="" class="action-slider"></a>
                        <div id="actions-box-slider">
                            <a href="AddEmailTemplate.aspx" class="action-edit">Add</a>
                            <asp:LinkButton CssClass="action-delete" ID="lndelete" OnClientClick="javascript: return confirm('Are you sure you want to delete this item?');"
                                runat="server" OnClick="lndelete_Click" CausesValidation="false">Delete</asp:LinkButton>
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="actions-box">
                        <asp:LinkButton ID="linkUpdate" runat="server" OnClick="linkUpdate_Click">
                                        <img src="images/Update.png" onmouseover="this.src='images/UpdateMouseOver.png';" onmouseout="this.src='images/Update.png';" alt="Search" /></asp:LinkButton>
                    </div>
                    <!-- end actions-box........... -->
                    <!--  start paging..................................................... -->
                    <table border="0" cellpadding="0" cellspacing="0" id="paging-table">
                        <tr>
                            <td>
                                <div style="width: 600px; float: left;">
                                    <div class="pages a_right" style="padding-bottom: 3px;" align="center">
                                        <strong>
                                            <cc1:PagerV2_8 ID="hyperlinkPager" runat="server" CompactModePageCount="5" GenerateFirstLastSection="true"
                                                OnCommand="pager_Command" GeneratePagerInfoSection="false" GenerateSmartShortCuts="false"
                                                GenerateHiddenHyperlinks="false" NormalModePageCount="5" PageSize="8" RTL="False"
                                                FirstClause="«" LastClause="»" NextClause="›" PreviousClause="‹" />
                                        </strong>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                    <!--  end paging................ -->
                    <div class="clear">
                    </div>
                </div>
                <!--  end content-table-inner ............................................END  -->
            </td>
            <td id="tbl-border-right">
            </td>
        </tr>
        <tr>
            <th class="sized bottomleft">
            </th>
            <td id="tbl-border-bottom">
                &nbsp;</td>
            <th class="sized bottomright">
            </th>
        </tr>
    </table>
    <div class="clear">
        &nbsp;</div>

    <script type="text/javascript">
       function CheckAll(obj)
        {
            // find any item not check
            var countUncheck = 0;
            var checkAll = true;
            var checkList = document.getElementsByTagName("input");
            if(!obj.checked)
            checkAll = false;
            for(var i = 0 ; i < checkList.length ; i++)
            { 
                if(checkList[i].type == 'checkbox' && checkList[i].id.indexOf("ckbDelete") >= 0 )
                {
                checkList[i].checked = checkAll;
                }
            } 
    }
    function createcalender()
    {
        var control = document.getElementById('<%=txtCreDateSearch.ClientID%>')  
         
        displayDatePicker(control.name , false,"dmy","/")  
       
             
    }
    function createcalen()
    {
        var controlDate = document.getElementById('<%=txtUpDateSearch.ClientID%>')  
         
        displayDatePicker(controlDate.name , false,"dmy","/")  
       
             
    }
      
    </script>

</asp:Content>
